﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace TulingMember.Application.Util
{
    public class DateTimeHelper
    {
        public static bool IsExpriredByDay(DateTime joinDate, double duration)
        {
            var expriedTime = DateTime.Now.AddDays(duration).Date;

            if (expriedTime > joinDate && joinDate <= DateTime.Now.Date)
            {
                return true;
            }
            return false;
            // return DateTime.Now - joinDate > TimeSpan.FromDays(180);
        }

        public static bool IsAdventByDay(DateTime joinDate, double duration)
        {
            var expriedTime = DateTime.Now.AddDays(duration).Date;

            if (expriedTime > joinDate && joinDate >= DateTime.Now.Date)
            {
                return true;
            }
            return false;
            // return DateTime.Now - joinDate > TimeSpan.FromDays(180);
        }
    }

}
